﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using MVCAddressBook.Models.Entities;

namespace MVCAddressBook.Models.Interfaces
{
    public interface IAdminService
    {
        /// <summary>
        /// 增加管理员
        /// </summary>
        /// <param name="admininfo"></param>
        bool RegUser(AdminInfo admininfo);

        /// <summary>
        /// 删除管理员
        /// </summary>
        /// <param name="admininfo"></param>
        bool Deluser(string Name);

        /// <summary>
        /// 修改管理员信息
        /// </summary>
        /// <param name="admininfo"></param>
        /// <returns></returns>
        bool EditUser(AdminInfo admininfo);

        /// <summary>
        /// 修改管理员密码
        /// </summary>
        /// <param name="admininfo"></param>
        /// <param name="OldPassword"></param>
        /// <param name="NewPassword"></param>
        bool AlterAdminPassword(string Name,string NewPassword);

        /// <summary>
        /// 判断通讯录名单是否已存在
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        bool IsExistUser(string Name);

        IList<AdminInfo> GetAdminList();

        AdminInfo GetAdmin(int ID);

        AdminInfo GetAdmin(string Name);

        bool IsLogin(string Name, string Password);

        /// <summary>
        /// 修改密码
        /// </summary>
        bool ChangePassword(string Name, string OldPassword, string NewPassword);
    }
}
